import torch


x = torch.rand(5,5)
y = torch.rand(5,5)
z = torch.rand(5,5)

x1 = torch.cat((x,y),0)
print(x1)

print('*'*80)
e = torch.tensor([[1,2],[3,4]])
f = torch.mul(e,e)
g = torch.mul(f,f)
print(g)

print('*'*80)
x = torch.ones(3,3,requires_grad=True)
y = x + 2
print('y',y,y.grad_fn)
z = y*y*3
out = z.mean()
out.backward()
print('z',z,'out',out)
print('x_grad',x.grad)